<script>
function copy(id)
{
	//alert("nisarg");
	//document.getElementById('one').value = 'nisarg';
	document.getElementById('one').value = document.getElementById(id).value;
	
}
</script>
<body>

<input type='text' onKeyPress='copy(this.id)' onKeyUp='copy(this.id)' />
<input type='text' id='one' />
</body>